home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C ++ / Frameworks / MacZoop 1.6.5 / Basic Classes / Z Headers / MacZoop.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-27  |  2.8 KB  |  106 lines  |  [TEXT/CWIE]

  1. /*************************************************************************************************
  2. *
  3. *
  4. *            ObjectMacZapp        -- a standard Mac OOP application template
  5. *
  6. *
  7. *
  8. *            MacZoop.h            -- standard defines and globals, always present. You can
  9. *                                    precompile this if you want.
  10. *
  11. *
  12. *            © 1996, Graham Cox
  13. *
  14. *
  15. *
  16. *
  17. *************************************************************************************************/
  18.  
  19.  
  20. #pragma once
  21.  
  22. #ifndef __MACZOOP__
  23. #define    __MACZOOP__
  24.  
  25. #include    <QDOffscreen.h>
  26. #include    <CodeFragments.h>
  27. #include    <drag.h>
  28. #include    <AppleEvents.h>
  29. #include    <Quickdraw.h>
  30. #include    <Gestalt.h>
  31.  
  32. #include    "ZDefines.h"
  33. #include    "ZErrors.h"
  34. #include    "ZApplication.h"
  35. #include    "ZWindowManager.h"
  36. #include    "ZClipboard.h"
  37. #include    "ZMenuBar.h"
  38.  
  39. #include    "CursorUtilities.h"
  40.  
  41.  
  42. /************************************************************************************************/
  43.  
  44. // MacZoop reserves commands numbered 1-127 for the standard menu commands such as
  45. // New, Open, Quit, Cut, Paste, etc. Your own commands should be numbered 128 and higher. You
  46. // can use any command you wish for any purpose- MacZoop is ignorant of meanings attached to
  47. // command numbers themselves. Since the command mapping tables are built on the fly at start-up,
  48. // you are free to reorganise the menus however you want to suit your application- MacZoop will
  49. // handle any standard commands present in the default manner, but doesn't care if they're not
  50. // there, etc. This allows great flexibility in organising your application. Caveat: don't add
  51. // items to the Apple Menu unless you are prepared to override the standard command handling.
  52.  
  53.  
  54. // Standard commands:
  55.  
  56. enum
  57. {
  58.     kNoCmd = 0,                    // 0
  59.     kCmdAbout = 1,                // 1
  60.     kCmdNew,                    // 2
  61.     kCmdOpen,                    // 3
  62.     kCmdClose,                    // 4
  63.     kCmdCloseAll,                // 5
  64.     kCmdSave,                    // 6
  65.     kCmdSaveAs,                    // 7
  66.     kCmdRevert,                    // 8
  67.     kCmdPageSetup,                // 9
  68.     kCmdPrint,                    // 10
  69.     kCmdQuit,                    // 11
  70.     kCmdUndo,                    // 12
  71.     kCmdCut,                    // 13
  72.     kCmdCopy,                    // 14
  73.     kCmdPaste,                    // 15
  74.     kCmdClear,                    // 16
  75.     kCmdSelectAll,                // 17
  76.     kCmdSelectNone,                // 18
  77.     kCmdPlainText,                // 19
  78.     kCmdBoldText,                // 20
  79.     kCmdItalicText,                // 21
  80.     kCmdUnderlineText,            // 22
  81.     kCmdOutlineText,            // 23
  82.     kCmdShadowText,                // 24
  83.     kCmdCondensedText,            // 25
  84.     kCmdExtendedText            // 26
  85. };
  86.  
  87.  
  88. // Global objects accessible from all classes:
  89.  
  90. extern    ZApplication*        gApplication;        // the application object
  91. extern    ZWindowManager*        gWindowManager;        // the window manager object
  92. extern    ZMenuBar*            gMenuBar;            // the main menubar object
  93. extern    ZClipboard*            gClipboard;            // the clipboard object
  94.  
  95. // Other globals
  96.  
  97. extern    OSType                gAppSignature;        // creator type of this application    
  98. extern    Boolean                gIsAColourMac;        // TRUE if we have any form of colour QD
  99. extern    tMacInfo            gMacInfo;            // other common gestalt results    
  100.  
  101. // static code called to kick the whole thing into life:
  102.  
  103. void    RunApplication();
  104.  
  105.  
  106. #endif